package com.genexususa.eo.connection.google.test.run;

import com.genexususa.eo.connection.google.analytics.AnalyticsManager;

/**
 * Created with IntelliJ IDEA.
 * User: Emiliano Martinez
 * Date: 8/29/14
 * Time: 1:57 PM
 * To change this template use File | Settings | File Templates.
 */
public class ConsumeGetUsersAndSessions {

    public static void main(String[] args){

        String xml = "<GoogleAnalyticsQuery xmlns=\"L2TMediaTrunk\">\n" +
                "\t<filePath>/L2TData/usEmiliano</filePath>\n" +
                "\t<applicationName>L2TMEDIA</applicationName>\n" +
                "\t<profileId>65425896</profileId>\n" +
                "\t<startDate>2014-08-20</startDate>\n" +
                "\t<endDate>2014-08-20</endDate>\n" +
                "\t<metrics>\n" +
                "\t\t<Item>ga:newUsers</Item>\n" +
                "\t\t<Item>ga:sessions</Item>\n" +
                "\t</metrics>\n" +
                "\t<dimensions>\n" +
                "\t\t<Item>ga:userType</Item>\n" +
                "\t</dimensions>\n" +
                "\t<maxResults>0</maxResults>\n" +
                "</GoogleAnalyticsQuery>";
        System.out.println(xml);
        //System.out.println("1-------------------------------------------------------------------------");

        AnalyticsManager am = new AnalyticsManager();
        String res = am.getUsersAndSessions(xml);

        System.out.println(res);

    }
}
